<%@ include file="/common/taglibs.jsp" %>

<title><fmt:message key="captchaForm.title"/></title>
<content tag="heading"><fmt:message key="user.captcha"/></content>
<body id="signup"/>

<div class="separator"></div>

<s:form name="captchaForm" action="captcha" method="post" validate="true">
    <s:hidden name="original_request_method"/>
    <s:hidden name="original_requestUrl"/>
    <s:hidden name="original_request_parameters"/>

    <li class="info">
        <fmt:message key="captchaForm.message"/>
    </li>

    <li>
        <fmt:message key="captchaForm.prompt"/>
    </li>

    <li>
        <a href="javascript:next();">
            <!--<img src="jcaptcha.jpg" name="captcha" alt="If the image is illegible, click it to get another one."/>-->
            <img src="jcaptcha.jpg" name="captcha" alt="<fmt:message key='user.captcha'/>"
                 title="<fmt:message key='jcaptcha.title'/>"/>
        </a>
    </li>

    <li>
        <s:textfield name="j_captcha_response" key="user.captcha" theme="xhtml" cssClass="text medium"
                     required="true" title="%{getText('jcaptcha.promt.title')}"/>
            <%--<s:textfield name="j_captcha_response" label="%{getText('captchaForm.text')}" cssClass="text medium"/>--%>
    </li>

    <li class="buttonBar bottom">
    		<s:submit key="button.done" cssClass="button"/>
        <%--<s:submit cssClass="button"/>--%>
    </li>

</s:form>

<script type="text/javascript">
    <!--
    //function gets the next captcha image
    function next() {
        var now = new Date();
        var newSrc = 'jcaptcha.jpg?' + now.getTime();
        if (document.images)  document.images.captcha.src = newSrc;
    }
    //-->
</script>
